import Cookies from 'js-cookie'
// 建议自己重新写一个名称！
const TokenKey = 'vue-admin'

// 设置一个独一无二的key
const timeKey = 'hrsaas-timestamp-key'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  console.log(11)
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

// 保存事件戳
export const setTimeStamp = () => {
  return Cookies.set(timeKey, Date.now())
}

// 获取事件戳
export const getTimeStam = () => {
  return Cookies.get(timeKey)
}
